package com.fuhao.springboot.controller;

import com.fuhao.springboot.model.Students;
import com.fuhao.springboot.service.StudentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class StudentsController {

    @Autowired
    private StudentsService studentsService;

    @RequestMapping("/findAll")
    public List<Students> findAll(){
        return studentsService.findStudentsAll();
    }
}
